import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import './plugins/element.js'
import axios from 'axios'

// 引入css样式
import 'element-ui/lib/theme-chalk/index.css';
import '../src/assets/css/global.css'

axios.defaults.baseURL = 'http://127.0.0.1:3000'

// 请求拦截器
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

Vue.prototype.$http = axios

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
